<?php echo "<h2>Thay Đổi Thông Tin Khách</h2>";?>
<form name="edit_customer" action="?act=createOrModifyCustomer&customer_id=<?php echo (isset($customer_id)? $customer_id:"")  ?>" method="POST" onsubmit="return validate_values()" enctype="multipart/form-data">
	<div class='row_field'>
    	<div class='label'>
			<label for="customer_name">Tên (*):</label>
        </div>
        <div class='field'>
			<input class='inputbox' type="text" id="customer_name" name="customer_name"  value="<?php echo $customer->getname() ?>">
        </div>
	</div>
	
    <div class='row_field'>
    	<div class='label'>
			<label for="address">Địa Chỉ:</label>
        </div>
		<div class='field'>
			<textarea class='inputbox' type="file" id="address" name="address"><?php echo $customer->getaddress()?></textarea>
        </div>
    </div>

	<div class='row_field'>
    	<div class='label'>
			<label for="phone_number">Số Điện Thoại:</label>
        </div>
        <div class='field'>
			<input class='inputbox' type="text" id="phone_number" name="phone_number"  value="<?php echo $customer->getphone_number() ?>">
        </div>
	</div>
	
	
	<div class='row_field'>
    	<div class='label'>
			<label for="birthday">Ngày Sinh:</label>
        </div>
        <div class='field'>
			<input class='inputbox birthday_picker' type="text" id="birthday" name="birthday"  value="<?php echo $customer->getbirthday() ?>">
        </div>
	</div>
	
	
	<div class='row_field'>
    	<div class='label'>
			<label for="identify_number">Số CMND/Passport(*):</label>
        </div>
        <div class='field'>
			<input class='inputbox' type="text" id="identify_number" name="identify_number"  value="<?php echo $customer->getidentify_number() ?>">
        </div>
	</div>
	
	
	<div class='row_field'>
    	<div class='label'>
			<label for="age_type">Lứa Tuổi:</label>
        </div>
        <div class='field'>
			<select class='inputbox' id='age_type' name='age_type'>
				<option value='CHILD' <?php if ($customer->getage_type == 'CHILD') echo 'selected="selected"';?>>Trẻ em (trên 12 tuổi)</option>
				<option value='INFANT' <?php if ($customer->getage_type == 'INFANT') echo 'selected="selected"';?>>Trẻ em (dưới 12 tuổi)</option>
				<option value='ADULT' <?php if ($customer->getage_type == 'ADULT') echo 'selected="selected"';?>>Người lớn</option>
			</select>
        </div>
	</div>
    
	<div class='row_field'><p>(*) Thông tin bắt buộc</p></div>
	<div class='row_field'>
		<input type="submit" value="Save">
		<input type="reset" value="Reset">
	</div>
	
</form>
<script type="text/javascript">
	function validate_values() {
		name = $('#customer_name').val();

		message = "Các mục sau đây là bắt buộc hoặc sai giá trị: \n";
		ok = true;
		if (name == "") {
			message += "Tên Khách \n";
			ok = false;
		}
		if (!ok) alert(message);
		return ok;
	}
</script>
?>